[pull] master from mattermost:master#740
Merged
Merged
Conversation
* Fix flaky TestUpdatePropertyValues_WriteAccessControl GetPropertyValues delegates to PropertyValueStore.GetMany, which does not preserve the caller's ID slice order. Subtests asserted on retrieved[0] and retrieved[1] by position, so a planner that returns rows sorted by ID or UpdateAt (e.g. with idx_propertyvalues_groupid_updateat_id) could swap values and fail intermittently. Look up returned values by ID before comparing JSON payloads. Tests-only change. Verified with `go test -run '^TestUpdatePropertyValues_WriteAccessControl$' -race -count=100` locally. Co-authored-by: mattermost-code <matty-code@mattermost.com> * Refactor property value test helper Co-authored-by: Miguel de la Cruz <mgdelacroix@users.noreply.github.com> * Remove redundant property test nil checks Co-authored-by: Miguel de la Cruz <mgdelacroix@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: mattermost-code <matty-code@mattermost.com> Co-authored-by: Miguel de la Cruz <mgdelacroix@users.noreply.github.com>
) * MM-68978 - Harden ABAC masking guards and fix sentinel detection * address pr feedback --------- Co-authored-by: Mattermost Build <build@mattermost.com>
The subtest used a fixed sleep before asserting callback counts, but job.run waits until runAt plus up to scheduleOnceJitter. Under the race detector or loaded CI that window can elapse after the sleep, so newCount3 is still 0 and the assertion flakes. Poll with require.Eventually (same approach as the paging subtest in #35891) so the test waits for the scheduled callback without weakening assertions. Tests-only change. Verified with: go test -run '^TestScheduleOnceSequential$/adding_two_callback_works' \ -race -count=100 ./pluginapi/cluster/... (from server/public) Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: mattermost-code <matty-code@mattermost.com>
Integrity checks scan the full database for orphaned channels, so parallel sqlstore tests and leftover rows from sibling subtests can inflate global record counts and flip index-based assertions. Reset tables at test start and scope assertions to child IDs created in each subtest. Use ElementsMatch for the two-record direct-channel case so merge order cannot flake. Tests-only change. Verified with `go test -run '^TestCheckTeamsChannelsIntegrity$' -race -count=100` locally. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: mattermost-code <matty-code@mattermost.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )